package com.zzw.message;

import com.zzw.serialport.SerialPortData;
import com.zzw.serialport.SerialPortError;
import com.zzw.serialport.SerialPortException;

/**
 * @author 赵志伟
 * @version 1.0
 */
@SuppressWarnings({"all"})

public class ReceivePopupIndex extends SerialPortData {
    private int pinboardIndex;
    private int powerbankIndex;
    private int status;

    public ReceivePopupIndex(byte[] bytes) throws SerialPortException {
        super(bytes);
        if(super.getCmd() != 0X21){
            throw new SerialPortException(SerialPortError.CMD);
        }

        int[] data = getData();

        this.pinboardIndex = data[0];
        this.powerbankIndex = data[1];
        this.status = data[2];
    }





}
